<a id="open_mercury" href="#mercury_html">
  {{ "mercury"|color_title }} (ctrl+k)
  </a>

<div id="mercury_html" style="display:none;">
  <h1>{{ "mercury"|color_title }}</h1>
  <p>Not seeing results? Ctrl+e will sync new events to the local store.</p>

  <fieldset>
  <ol>
    <li><label for="merc_root">root</label>
    <input id="merc_root"/>
    </li>
    <li><label for="merc_types">types</label>
    <input id="merc_types"/>
    </li>
    <li><label for="merc_authors">authors</label>
    <input id="merc_authors"/>
    </li>
    <li><label for="merc_keywords">keywords</label>
    <input id="merc_keywords"/>
    </li>
  </ol>
  </fieldset>
</div>

<div id="need_gears_html" style="display:none;">
  <h1>{{ "mercury"|color_title }}</h1>
  <h2>You will need to install
    <a href="http://gears.google.com">Google Gears</a> to use Mercury.
    </h2>
</div>

<script>
var merc_anchor = $('a#open_mercury');
if (!google.gears) {
  merc_anchor.attr('href', '#need_gears_html');
  }

merc_anchor.click(function() {
  var href = merc_anchor.attr('href')
  // var merc = $('<div id="merc"/>').html($(href).html());
  var html = $(href).html();
  console.log('merc_anchor clicked!');
  $.prompt(html);
  });

$(document).bind('keydown', 'Ctrl+k', function(){
  merc_anchor.click();
  });
</script>
